package com.woniuxy02;

/**
 * @author 作者
 * @create 2025-05-27 14:10
 */
public class Tesst01 {
    public static void main(String[] args) {
        int[] a={1,9,2,21,3,55,4,5};
        int max=a[0],min=a[0];
        for(int i=1;i<a.length;i++){
            if(a[i]>max){
                max=a[i];
            }
            if(a[i]<min){
                min=a[i];
            }
        }
        System.out.println("max:"+max);
        System.out.println("min:"+min);

        int x=1,y=2;
        System.out.println("交换前:x:"+x+",y:"+y);
        x=y;
        y=x;
        System.out.println("交换后:x:"+x+",y:"+y);
    }
}
